﻿@{
	var db = Database.Open("wishlistdb");
    var currentUser = db.QuerySingle("SELECT * FROM WishlistUser WHERE Id = @0", WebSecurity.CurrentUserId);
}
<div class="loginFormElement">
  @if (WebSecurity.IsAuthenticated) {
	  <span>Welcome <strong>@WebSecurity.CurrentUserName</strong>! @Gravatar.GetHtml(currentUser.Email, rating: GravatarRating.PG, imageSize: 20)
      [ <a href="@Href("~/Account/Logout")">Logout</a> ]</span>
  } else {
      <span>[ <a href="@Href("~/Account/Login")">Login</a> ]</span>
  }
</div>